package com.cskaoyan.model;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
public class Admin {
    private Integer id;

    @Length(min = 6, max = 12, message = "管理员名称不合规定")
    @Pattern(regexp = "^[a-z0-9A-Z\u4e00-\u9fa5]+$", message = "管理员名称不合规定")
    private String username;

    @Length(min = 6, message = "管理员密码长度不能小于6")
    private String password;

    private String lastLoginIp;

    private Date lastLoginTime;

    private String avatar;

    private Date addTime;

    private Date updateTime;

    private Boolean deleted;

    private Integer[] roleIds;

}
